<template>
  <div>
    <h2>房型添加</h2>
    <table  class="table table-bordered">
      <tr>
        <td align="right">房型名称</td>
        <td>
          <input type="text" v-model="info.HouseTypeName"/>
        </td>
      </tr>
      <tr>
        <td align="right">房型图片</td>
        <td>
          <input type="file" />
        </td>
      </tr>
      <tr>
        <td align="right">房型面积</td>
        <td>
          <input type="text" />
        </td>
      </tr>
      <tr>
        <td align="right">是否有窗</td>
        <td>
          <input type="radio" name="win" />是
          <input type="radio" name="win" />否
        </td>
      </tr>
      <tr>
        <td align="right">最多入住人数</td>
        <td>
          <input type="text" />
        </td>
      </tr>
      <tr>
        <td align="right">房型价格</td>
        <td>
          <input type="text" />
        </td>
      </tr>
      <tr>
        <td align="right">房型状态</td>
        <td>
          <input type="radio" name="state" />发布
          <input type="radio" name="state" />不发布
        </td>
      </tr>
      <tr>
        <td align="right"></td>
        <td>
          <input type="button" value="提交" class="btn btn-primary">
        </td>
      </tr>
    </table>
  </div>
</template>

<script setup lang="ts">
import {ref,reactive} from 'vue';
import axios from "axios";
import {useRouter,useRoute} from 'vue-router';
//useRouter:作用创建出一个路由器 实现页面跳转 并且 可以惊醒传参
const router = useRouter();
const route = useRoute();

//增加房型时需要向后端传递的数据
let info:any = reactive({
  HouseTypeName: '',
  Photo: '',
  Area: '',
  IsWin: 1,
  PeopleCount: '',
  money: '',
  State: 1,
  IsDeleted: true
})

//图片上传
const img = (e:any) => {
  //1.图片上传的文件
  let obj = e.target.files[0];
}
</script>

<style scoped>

</style>